home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
PIL
/
ContainerIO.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
2KB
|
72 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
class ContainerIO:
def __init__(self, file, offset, length):
self.fh = file
self.pos = 0
self.offset = offset
self.length = length
self.fh.seek(offset)
def isatty(self):
return 0
def seek(self, offset, mode = 0):
if mode == 1:
self.pos = self.pos + offset
elif mode == 2:
self.pos = self.length + offset
else:
self.pos = offset
self.pos = max(0, min(self.pos, self.length))
self.fh.seek(self.offset + self.pos)
def tell(self):
return self.pos
def read(self, n = 0):
if n:
n = min(n, self.length - self.pos)
else:
n = self.length - self.pos
if not n:
return ''
self.pos = self.pos + n
return self.fh.read(n)
def readline(self):
s = ''
while None:
c = self.read(1)
if not c:
break
s = s + c
if c == '\n':
break
continue
continue
return s
def readlines(self):
l = []
while None:
s = self.readline()
if not s:
break
continue
return l